<script setup>
	import {getTruckApi} from '@/apis/my.js'
	import {ref} from 'vue'
	import {onLoad} from '@dcloudio/uni-app'
	
	const list=ref({})
	onLoad(()=>{
		getList()
	})
	
	const getList=async()=>{
		const res=await getTruckApi()
		console.log(res);
		list.value=res.data
	}
</script>

<template>
  <view class="page-container">
    <swiper class="truck-pictures" indicator-active-color="#fff" circular indicator-dots>
      <swiper-item v-for="item in list.pictureList" :key="item.url">
        <image class="picture" mode="aspectFill" :src="item.url"></image>
      </swiper-item>
    </swiper>
    <view class="truck-meta">
      <uni-list :border="false">
        <uni-list-item :border="false" title="车辆编号" :rightText="list.id" />
        <uni-list-item :border="false" title="车辆号牌" :rightText="list.licensePlate" />
        <uni-list-item :border="false" title="车型" :rightText="list.truckType" />
        <uni-list-item :border="false" title="所属机构" :rightText="list.currentOrganName" />
        <uni-list-item :border="false" title="载重" :rightText="list.allowableLoad" />
      </uni-list>
    </view>
  </view>
</template>

<style lang="scss" scoped>
  @import './index.scss';
</style>